<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
</body>
<script>

    // 1.数组的合并
    const kuaizi = ["王太利", "肖央"];
    const fenghuang = ["曾毅", "玲花"];
    // es5 数组合并
    const all = kuaizi.concat(fenghuang);

    // es6写法 ...[数组] 可以将数组转化成参数列
    const all2 = [...kuaizi, ...fenghuang];

    console.log(all, all2);


    // 2.数组的克隆
    const all3 = [...all2];
    console.log(all2, all3);

    all2[0] = "王大锤";
    // all3还是原来的值
    console.log(all2, all3);

    // 将伪数组转化成真数组
    let divs = document.querySelectorAll('div');
    console.log(divs);
    let divsArr = [...divs];
    console.log(divsArr);
</script>

</html>